package gui;

import javax.media.j3d.Canvas3D;

import controller.AbstractController;

public class InputAdapter {
	
	private final Canvas3D canvas;
	
	public InputAdapter(Canvas3D canvas) {
		this.canvas = canvas;
	}
	
	public void addInputListener(AbstractController controller) {
		canvas.addMouseListener(controller);
		canvas.addMouseMotionListener(controller);
		canvas.addMouseWheelListener(controller);
		canvas.addKeyListener(controller);
	}
	
	public void removeInputListener(AbstractController controller) {
		canvas.removeMouseListener(controller);
		canvas.removeMouseMotionListener(controller);
		canvas.removeMouseWheelListener(controller);
		canvas.removeKeyListener(controller);		
	}
}
